package com.mm.cloud.sys.feign;

import com.mm.cloud.common.core.result.Result;
import com.mm.cloud.common.security.annotation.InnerAuth;
import com.mm.cloud.feign.sys.api.dto.BtnPermissionCodeFeignDTO;
import com.mm.cloud.feign.sys.api.service.IPermissionFeignService;
import com.mm.cloud.sys.service.IPermissionService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 资源基础信息
 *
 * @author mr
 * @since 2023-04-20
 */
@AllArgsConstructor
@RestController
public class PermissionFeignApi implements IPermissionFeignService {

    /**
     * 资源基础信息
     */
    private final IPermissionService permissionService;

    /**
     * 查询操作权限
     *
     * @param dto
     * @return
     */
    @Override
    @InnerAuth
    public Result<List<String>> getBtnPermissionCode(BtnPermissionCodeFeignDTO dto, String source) {
        return permissionService.getBtnPermissionCode(dto);
    }
}
